-
Notifications
You must be signed in to change notification settings - Fork 321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CNI Acceptance test on GKE #1446
Conversation
.circleci/config.yml
Outdated
@@ -1089,6 +1158,11 @@ workflows: | |||
# requires: | |||
# - cleanup-gcp-resources |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will clean this all up before merging
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:chef-kiss:
.circleci/config.yml
Outdated
- run: mkdir -p $TEST_RESULTS | ||
|
||
- run-acceptance-tests: | ||
additional-flags: -kubeconfig="$primary_kubeconfig" -secondary-kubeconfig="$secondary_kubeconfig" -enable-pod-security-policies -enable-transparent-proxy -enable-cni -enable-gke |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: could this flag be called -use-gke
similar to -use-kind
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit addressed. 😺
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Just one tiny comment
c72ac62
to
de02979
Compare
de02979
to
83c8100
Compare
- Added a new make target for installing Calico CNI in Kind. The target installs Calico CNI using config files located under /acceptance tests - Added a helper make target for setting up local Kind with Calico just in case anyone wants to run it. - Added a kind.config for setting up the Kind cluster - Added an -enable-cni flag to the acceptance test config so that it can be passed through from CircleCI - Added a nightly circleci job for running the CNI kind tests - I had missed a bats test for the connect-inject template that I merged in a previous PR
…connectInject.cni.enabled from several files as the framework will set this when the flag is passed in
- Added a -ue-gke flag to the acceptance test command so that the flag can be passed through to the tests - If both, -enable-cni and -ue-gke are passed through then the cniBinDir gets set for helm values. - GKE would not install the CNI plugin unless the use security policy was set. - GKE was throwing an error saying that allowPrivilegeEscalation: true needed to be set if privileged: true. Once set, tests passed.
83c8100
to
aeb3f2e
Compare
- Added a -use-gke flag to the acceptance test command so that the flag can be passed through to the tests - If both, -enable-cni and -use-gke are passed through then the cniBinDir gets set for helm values. - GKE would not install the CNI plugin unless the use security policy was set. - GKE was throwing an error saying that allowPrivilegeEscalation: true needed to be set if privileged: true. Once set, tests passed.
This PR builds on top of the CNI acceptance tests on Kind PR to get things running on GKE.
GKE is the only cloud platform that has a different requirement for
connectInject.cni.cniBinDir
and does not use the default. The consul-cni binary needs to be installed to/home/kubernetes/bin
.Changes proposed in this PR:
-use-gke
flag to the acceptance test command so that the flag can be passed through to the tests-enable-cni
and-use-gke
are passed through then the cniBinDir gets set for helm values.use
security policy was set.allowPrivilegeEscalation: true
needed to be set ifprivileged: true
. Once set, tests passed.How I've tested this PR:
How I expect reviewers to test this PR:
👀
Checklist: